<template>
  <div class="app-main-container">
    <div class="app-main-title">
      模版配置
      <div class="goback" @click="goBack">
        <i class="el-icon-refresh-left" /> 返回上一页
      </div>
    </div>
    <el-tabs v-model="activeTab" class="mt20" @tab-click="tabsChange">
      <el-tab-pane label="商户首页装修" name="5">
        <ShopHome
          v-if="activeTab === '5'"
          ref="homeRef"
          :template-id="activeId"
          :meta="meta"
        />
      </el-tab-pane>
      <el-tab-pane label="场馆首页装修" name="0">
        <Home
          v-if="activeTab === '0'"
          ref="homeRef"
          :template-id="activeId"
          :meta="meta"
        />
      </el-tab-pane>
      <el-tab-pane label="我的页面" name="1">
        <Personal
          v-if="activeTab === '1'"
          ref="taskAdminRef"
          :template-id="activeId"
          :meta="meta"
        />
      </el-tab-pane>
      <el-tab-pane label="底部导航" name="2">
        <Tabbar
          v-if="activeTab === '2'"
          :template-id="activeId"
          :meta="meta"
        />
      </el-tab-pane>
      <el-tab-pane label="主题设置" name="3">
        <Theme
          v-if="activeTab === '3'"
          :template-id="activeId"
          :meta="meta"
        />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import ShopHome from './tabs/shopHome'
import Home from './tabs/home'
import Personal from './tabs/personal'
import Tabbar from './tabs/tabbar'
import Theme from './tabs/theme'
// import { getHomeMiniTem } from '@/api'
export default {
  components: {
    Home,
    ShopHome,
    Personal,
    Tabbar,
    Theme
  },
  data() {
    return {
      activeId: '',
      param: {},
      activeTab: '5',
      meta: [],
      miniConfig: {}
    }
  },
  created() {
    this.activeId = this.$route.query.id
    // this.initData()
  },
  methods: {
    // initData() {
    //   getHomeMiniTem({ param: { code: 'T_HOME', templateId: this.activeId }}).then(res => {
    //     this.miniConfig = res.recordList
    //   })
    // },
    tabsChange() {

    },
    goBack() {
      this.$router.go(-1)
    }
  }
}
</script>

<style>
</style>
